﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class _Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        #region TestCase #1 (http://ru.wikipedia.org/wiki/WebSocket)
        //GET /demo HTTP/1.1
        //Upgrade: WebSocket
        //Connection: Upgrade
        //Sec-WebSocket-Key2: 4 @1  46546xW%0l 1 5
        //Host: example.com
        //Sec-WebSocket-Key1: 12998 5 Y3 1  .P00
        //Origin: http://example.com
        //WebSocket-Protocol: sample

        //^n:ds[4U

        //Result should be 8jKS'y:G*Co,Wxa-
        #endregion
        //Response.Write(WebSocks.WebSockServer.CalculateSecurityBody("12998 5 Y3 1  .P00", "4 @1  46546xW%0l 1 5", "^n:ds[4U"));
                
        //Response.Write(WebSocks.WebSockServer.CalculateSecurityBody("3e6b263  4 17 80", "17  9 G`ZD9   2 2b 7X 3 /r90", "WjN}|M(6"));
        //Response.Write(WebSocks.WebSockServer.CalculateSecurityBody("18x 6]8vM;54 *(5:  {   U1]8  z [  8", "1_ tx7X d  <  nw  334J702) 7]o}` 0", "Tm[K T2u"));
        //Response.Write(WebSocks.WebSockServer.CalculateSecurityBody("12998 5 Y3 1  .P00", "4 @1  46546xW%0l 1 5", "^n:ds[4U"));
    }
}